/*
 * DxfSections.java
 *
 * Created on 5 de Dezembro de 2007, 15:08
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

package importadorDXF;

/**
 *
 * @author rafaelbuck
 */
public class DxfSection
{
    
    /** Creates a new instance of DxfSection */
    public DxfSection()
    {
        this(true);
    }

    /** Creates a new instance of DxfSection */
    public DxfSection(boolean warn)
    {
        issueWarning = false;
        issueWarning = warn;
    }

    void read(DxfGroups grp, DxfReporter reporter)
        throws DxfException
    {
        if(issueWarning)
            reporter.showWarningRes("warnUnknownSection", new String[] {
                grp.valToString()
            });
        do
            grp.read();
        while(grp.number != 0 || !"ENDSEC".equals(grp.valToString()));
    }

    protected boolean issueWarning;
}